import java.util.Scanner;

/**
 * @author Lxh
 * @version 2022.1.2
 * @date 2022/4/30 8:25
 */


public class TestDemo01 {
  /*  public static int sum(int a,int b){
        return a+b;
    }
    public static double sum(double a1,double b1,double c1){
        return a1+b1+c1;
    }
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.print("请输入两个整数 ");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.print("请输入三个小数 ");
        double a1 = scanner.nextDouble();
        double b1 = scanner.nextDouble();
        double c1 = scanner.nextDouble();
        System.out.println("两个整数的和为" + sum(a,b));
        System.out.println("三个小数的和为"+sum(a1,b1,c1));
    }*/
 /* public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
       int n = scanner.nextInt();
       int ret = 1;
       int sum = 0;
      for (int i = 1; i <= n; i++) {
          ret *= i;
          sum += ret;
      }
      System.out.println(sum);
  }*/
/*  public static void main(String[] args) {
      int[] array={1,2,3,4,1,2,3};
      int sum = 0;
      for (int i = 0; i < 7; i++) {
          sum ^= array[i];
      }
      System.out.println(sum);
  }*/
   /* public static int max(int a,int b)
    {
        return a>b?a:b;
    }
    public static double max(double a,double b)
    {
        return a>b?a:b;
    }
    public static double max(double a,double b,int c)
    {
        double ret = 0;
        ret = a>b?a:b;
        return ret>c?ret:c;
    }
  public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两整数比较大小: ");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
      System.out.println(max(a,b));
      System.out.println("请输入两个小数比较大小：");
      double a1 = scanner.nextDouble();
      double b1 = scanner.nextDouble();
      System.out.println(max(a1,b1));
      System.out.println("请输入两个小数和一个整数比较大小: ");
      double a2 = scanner.nextDouble();;
      double b2 = scanner.nextDouble();
      int c2 = scanner.nextInt();
      System.out.println(max(a2,b2,c2));
  }*/
/*  public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      int n = scanner.nextInt();
      System.out.println("输入n求n的阶乘:");
      int ret =1;
      for (int i = 1; i <= n; i++) {
          ret *= i;
      }
      System.out.println(ret);
  }*/
  public static int Fibonacci(int n) {
      if(n==1 || n==2) {
          return 1;
      }
      int tmp = Fibonacci(n-1)+Fibonacci(n-2);
      return tmp;
  }
  public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      int n = scanner.nextInt();
      System.out.println(Fibonacci(n));
  }
}
